// createWebHashHistory:history路由模式 createWebHistory:hash路由模式
import {createRouter, createWebHistory} from "vue-router"
import staticRoutes from "@/router/staticRoutes.js";

const router = createRouter({
    // 相当于Vue2当中的mode:"history"
    history: createWebHistory(),
    routes: [...staticRoutes],
    scrollBehavior() {
        return {
            left: 0,// 相当于之前的x
            top: 0// 相当于之前的y
        }
    }
});
export default router